package net.sppan.base.dao;

import net.sppan.base.dao.support.IBaseDao;
import net.sppan.base.entity.mgEntity.MgUserCode;
import net.sppan.base.entity.mgEntity.MgUser;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

@Repository
public interface IMgUserCodeDao extends IBaseDao<MgUserCode,Integer> {

	MgUserCode findByUserName(String username);

	MgUserCode findByTelephone(String telephone);

	MgUserCode findByCode(String code);
	MgUserCode findByTelephoneAndCodeType(String telephone,String type);

	Page<MgUser> findAllByUserNameContaining(String searchText, Pageable pageable);

	MgUserCode findByCodeStatusAndCodeType(String codeStatus,String codeType);

}
